package com.enjoy.cap9.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

import com.enjoy.cap9.dao.TestDao;

@Configuration
@ComponentScan({ "com.enjoy.cap9" })
public class Cap9MainConfig {

	// @Primary
	// @Bean("testDao2")
	  @Primary
	  @Bean("testDao2") 
	  public TestDao testDao() {
		  TestDao testDao = new TestDao();
		  testDao.setFlag("2"); 
		  return testDao;
	  }
	

}
